﻿using System;
using System.Collections.Generic;

namespace SameGame.Model
{
	public interface IBoard
	{
		event EventHandler ScoreChanged;
		event EventHandler GameIsOver;
		event EventHandler ItemsChanged;
		event EventHandler BoardInited;

		void Init(int x, int y, int _colors = 3);
		CItem getItem(int column, int row);
		CItem getItem(CItemLocation pos);
		IEnumerable<CItem> getAllItems();
		IEnumerable<CItem> getItems(int row, int column);
		IEnumerable<CItem> getItems(CItemLocation pos);
		bool isValidPosition(int column, int row);
		bool isValidPosition(CItemLocation loc);

		bool Highlight(int column, int row);
		bool Remove(int column, int row);

		CFrame getLastFrame();

		CItem this[int x, int y]
		{
			get;
		}

		int Score { get; }
		bool GameOver { get; }

		int Width { get; set; }
		int Height { get; set; }
	}
}
